package com.engine.salary.entity.salaryBill.dto;

import com.engine.salary.annotation.Auth;
import com.engine.salary.annotation.SalaryTable;
import com.engine.salary.annotation.SalaryTableColumn;
import com.engine.salary.annotation.SalaryTableOperate;
import com.engine.salary.enums.auth.AuthCheckTypeEnum;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.Set;

/**
 * @Description: 工资单发放
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@SalaryTable(pageId = "a4f85287-289dff07669d7a23de0ef88d2f7129e7", operates = {
        @SalaryTableOperate(index = "0", text = "发放"),
        @SalaryTableOperate(index = "1", text = "查看详情"),
        @SalaryTableOperate(index = "2", text = "更新模板")
})
@Auth(page = "salaryBill", checkType = AuthCheckTypeEnum.SOB, sobIdField = "salarySobId")
public class SalarySendListDTO {

    // 主键id
    @SalaryTableColumn(column = "id", display = false)
    private Long id;

//   薪资所属月")
//    @WeaFormat(
//            label = "薪资所属月",
//            labelId = 87614,
//            tableColumn = @TableColumn(width = "10%")
//    )
//    @JsonFormat(pattern = "yyyy-MM")

    //    薪资所属月
    @SalaryTableColumn(text = "薪资所属月", width = "10%", column = "salaryYearMonth")
    private Date salaryYearMonth;

    /**
     * 薪资账套id
     */
    @JsonIgnore
    private Long salarySobId;

//   薪资账套")
//    @WeaFormat(
//            label = "薪资账套",
//            labelId = 87889,
//            tableColumn = @TableColumn(width = "35%")
//    )

    //    薪资账套
    @SalaryTableColumn(text = "薪资账套", width = "35%", column = "username")
    private String salarySob;

    //   核算次数")
//    核算次数
    private String acctTimes;

    //   工资单模板")
//    @WeaFormat(
//            label = "工资单模板",
//            labelId = 93214,
//            tableColumn = @TableColumn(width = "25%")
//    )
    @SalaryTableColumn(text = "工资单模板", width = "25%", column = "template")
//    工资单模板
    private String template;

    //   工资单模板Id")
//    工资单模板Id
    @SalaryTableColumn(text = "工资单模板id", width = "0%", column = "templateId", display = false)
    private Long templateId;

    /**
     * 已发送数量
     */
//    @JsonIgnore
    @SalaryTableColumn(text = "已发送数量", width = "0%", column = "sendNum", display = false)
    private Integer sendNum;

    /**
     * 发送总数
     */
//    @JsonIgnore
    @SalaryTableColumn(text = "发送总数", width = "0%", column = "sendTotal", display = false)
    private Integer sendTotal;

    //   已发放")
//    @WeaFormat(
//            label = "已发放",
//            labelId = 93212,
//            tableColumn = @TableColumn(width = "15%")
//    )
//    已发放
    @SalaryTableColumn(text = "已发放", width = "15%", column = "sendSituation")
    private String sendSituation;

    //   最后发送时间")
//    @WeaFormat(
//            label = "最后发送时间",
//            labelId = 93213,
//            tableColumn = @TableColumn(width = "15%")
//    )
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
//    最后发送时间
    @SalaryTableColumn(text = "最后发送时间", width = "15%", column = "lastSendTime")
    private Date lastSendTime;

    /**
     * 薪资核算ID
     */
    private Long salaryAcctId;

    /**
     * 发放状态。0：未冻结、1：已冻结
     */
    private Integer sendStatus;

    /**
     * 工资单类型。0：正常，1：补发
     */
    private Integer salaryAcctType;

    /**
     * 薪资记录核算类型。0：正常，1：补发
     */
    private Integer salaryAcctRecordType;

    /**
     * 能够查看详情
     */
    private Boolean canSeeDetail;
    /**
     * 是否回算过 0：没有回算过，1：回算过
     */
//    private Integer haveBackCalc;

    /**
     * 工资单确认反馈状态
     */
    private Integer ackFeedbackStatus;

   private Set<String> opts;
}
